// pages/tpl/tpl.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    msg: 'hi 双向绑定',
    url: 'https://pic.616pic.com/photoone/00/02/00/618cf19bb21da7473.jpg',
    bool: true,
    students: [
      { id: 1, name: '小明', age: 18, gender: '男' },
      { id: 2, name: '小红', age: 17, gender: '女' },
      { id: 3, name: '小刚', age: 19, gender: '男' },
      { id: 4, name: '小丽', age: 18, gender: '女' },
      { id: 5, name: '小米', age: 19, gender: '女' },
    ],
  },
  // 解决小程序双向绑定警告
  cb() { },
  login() {
    console.log('获取用户名和密码：', this.data.msg)
  }

})